﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;

namespace ISAMonitor.DNSPODAPI
{

    /*
     * JSON
{
    "status": {
        "code": "1",
        "message": "Get domain list success.",
        "created_at": "2008-11-25 21:14:50"
    },
    "domains": {
        "domain": [
            {
                "id": 141839,
                "name": "test110891592.com",
                "status": "1",
                "records": "0"
            },
            {
                "id": 141840,
                "name": "test1451919503.com",
                "status": "1",
                "records": "0"
            }
        ]
    }
}
     */

    [DataContract]
    public class DomainListRet
    {
        [DataMember(Order = 0)]
        public status status { get; set; }
        [DataMember(Order = 1)]
        public domains domains { get; set; }

    }

    [DataContract]
    public class domains
    {
        [DataMember]
        public IList<domain> domain { get; set; }
    }

    [DataContract]
    public class status
    {
        [DataMember(Order = 0)]
        public string code { get; set; }
        [DataMember(Order = 1)]
        public string message { get; set; }
        [DataMember(Order = 2)]
        public string created_at { get; set; }

    }

    [DataContract]
    public class domain
    {
        [DataMember(Order = 0)]
        public int id { get; set; }
        [DataMember(Order = 1)]
        public string name { get; set; }
        [DataMember(Order = 2)]
        public string status { get; set; }
        [DataMember(Order = 3)]
        public string records { get; set; }
    }
}